<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ include file="config.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>
	<script type="text/javascript" src="${ctx}/js/jquery-3.3.1.min.js"></script>
	<script type="text/javascript" src="js/shop.js"></script>
	<link href="${ctx}/css/shop.css" rel="stylesheet"/>
</head>
<body>
	<div class="handler4" >
		<div>
			<c:forEach items="${page.list}" var="commodity">
				<div calss="">
					<span>.............................................................................................................................................................................................................</span><br/>
					<div class="handler4Left">
						<img class="commImg" src="${commodity.imgpath}" /><br/>
						<img class="searchImg" src="images/q_images/search.gif"><a href="#">查看大图</a>
					</div>
					<div class="handler4Right">
						<p>商品名称：${commodity.name}</p>
						<p>单价：￥${commodity.price}</p>
						<p>货量：${commodity.num}</p>
						描述：${commodity.described}
						<div style="text-align: right"><img id="${commodity.id}" class="addCar" src="images/q_images/pay.jpg" /><img id="${commodity.id}" class="info" src="images/q_images/detail.jpg" /></div>
					</div>
				</div>
			</c:forEach>
		</div>
		<div style="float: left">
			&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp当前${page.currentPage + 1}/${page.totalPage}页，共${page.totalCount}条记录&nbsp&nbsp&nbsp&nbsp&nbsp<a href="#" id="firstPage">首页</a>&nbsp&nbsp&nbsp<a href="#" id="parentPage">上一页</a>
			&nbsp&nbsp&nbsp&nbsp<a href="#" id="nextPage">下一页</a>&nbsp&nbsp&nbsp&nbsp<a href="#" id="lastPage">尾页</a>&nbsp&nbsp&nbsp&nbsp每页
			
			<input id="pageSize" style="width: 31px;" type="number" min="1" max="5" value="${page.pageSize}">
			条记录&nbsp&nbsp&nbsp&nbsp转到
			<select id="currentPage">
				<c:forEach begin="1" end="${page.totalPage}" var="currentPage" >
					<c:choose>
						<c:when test="${(page.currentPage+1) == currentPage}">
				    		<option selected="selected">${currentPage}</option>
						</c:when>
						<c:otherwise>
				    		<option>${currentPage}</option>
						</c:otherwise>
					</c:choose>
				</c:forEach>
			</select>页
		</div>
	</div>
	<!-- 放大图片 -->
	<div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;">
		<div id="innerdiv" style="position:absolute;">
			<img id="bigimg" style="border:5px solid #fff;" src="" />
		</div>
	</div>
</body>
</html>